/** @jsxImportSource @emotion/react */
import * as React from "react";
import {CCell, Cell, Table, TableBody, TableRow, Text} from "customize-easy-ui-component";
import { DirectLink } from "../../../routing/Link";
import {俩列检验设备概况} from "../../park/views";
import {config设备概况} from "./orcBase";

//整个结论报告页
export const 检验结论报告= ({ orc, rep,theme } : { orc: any, rep: any,theme:any}
) => {
  return <>
    <Text id={'Conclusion'} variant="h2" css={{textAlign:'center', "@media print": {pageBreakBefore: 'always',},
    }}>长输管道施工监督检验结论报告</Text>
    <Text css={{display: 'flex',flexDirection: 'row-reverse',marginRight: '2rem'
    }}>报告编号：{rep.isp?.no}</Text>
    <Table fixed={ ["16%","34%","16%","%"] } css={ {borderCollapse: 'collapse' } } tight  miniw={800}>
      <TableBody>
        <DirectLink  href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Survey#Survey`}>
          <TableRow><CCell scope="row" colSpan={4}>
              <Text variant="h5" css={{minHeight:'2rem',alignContent:'center'}}>长输管道建设基本情况</Text>
          </CCell></TableRow>
         {俩列检验设备概况({orc,rep, config:config设备概况})}
        </DirectLink>
        <DirectLink href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion#Conclusion`}>
          <TableRow>
            <CCell>监督检验开始日期</CCell><CCell>{orc.检验日期1}</CCell>
            <CCell>监督检验结束日期</CCell><CCell>{orc.检验日期}</CCell>
          </TableRow>
        </DirectLink>
      </TableBody>
    </Table>
    <Table  fixed={ ["11%","%"]  } css={ {borderCollapse: 'collapse' } } tight  miniw={800}>
        <TableBody>
          <DirectLink href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion#Conclusion`}>
          <TableRow>
            <CCell colSpan={2}>
              <Text css={{letterSpacing: '0.7rem'}}>监督检验结论</Text> <br/>
              <Text css={{display: 'block',textIndent: '2rem',textAlign: 'left',marginTop:'0.6rem'}}>根据TSG D7006-2020《压力管道监督检验规则》的规定，依据有关技术标准与设计图纸的要求，经监督检验，该压力管道施工监督检验结论为
                &nbsp;&nbsp;
                <Text css={{fontSize:'1.8rem'}}>{orc?.检验结论}</Text>&nbsp;。
              </Text>
            </CCell>
          </TableRow>
            <TableRow >
              <CCell >参检人员</CCell>
              <CCell >{orc.参检人员}</CCell>
            </TableRow>
          </DirectLink>
        </TableBody>
    </Table>
  </>;
};
